package com.songlanyun.modules.group.dao;

import com.songlanyun.modules.category.entity.SystemProductCategoryEntity;
import com.songlanyun.modules.group.entity.ProductGoodsGroupEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.songlanyun.modules.group.model.vo.GoodsGroupSlim;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商家店铺商品分组表（只用来在商家店铺内展示）
 * 
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-03 12:57:25
 */
@Mapper
public interface ProductGoodsGroupDao extends BaseMapper<ProductGoodsGroupEntity> {
    ProductGoodsGroupEntity getByShopIdAndId(@Param("shop_id") Long shopId,@Param("id") Long id);
    ProductGoodsGroupEntity getByName(@Param("shop_id") Long shopId,@Param("name") String name);
    List<GoodsGroupSlim> selectGoodsGroupRelation(@Param("goods_auth_shop_id") Long goodsAuthShopId);

    List<GoodsGroupSlim> selectGoodsGroupRelationByGoodsIdAndShopId(@Param("shopId") Long shopId,@Param("goodsId") Long goodsId);
}
